package com.sjlh.centurylianhua.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sjlh.centurylianhua.entity.LossesLog;
import com.sjlh.centurylianhua.entity.Module;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ModuleMapper extends BaseMapper<Module> {
    @Select("select * from module where id=some" +
            "(select mo.id from module mo,module_role mr,user_role ur"+" ${ew.customSqlSegment}) or" +
            " id=some(select mo.parentId from module mo,module_role mr,user_role ur"+" ${ew.customSqlSegment})")
    List<Module> modulelist(@Param("ew") QueryWrapper<Module> wrapper);
}
